﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SM4加密
{
    class Program
    {
        static void Main(string[] args)
        {
            MainSm4 sm4 = new MainSm4();
            string EnData = sm4.Encrypt_ECB(
                "ZGH&HR&MES201109"
                , false
                , @"12312312312312312"
            );
            //string DeData = string.Empty;
            string DeData = sm4.Decrypt_ECB(
                "ZGH&HR&MES201109",
                false, "50e8e868f33fab16f0ceca7f7e22760f4f225a4f41cbda931954cdd600c9734e"
            );

            //Console.WriteLine("明文：" + DeData + "密文：" + EnData);

            Console.WriteLine( "加密后的文本：" + EnData);
            Console.WriteLine( "解密后的文本：" + DeData);
            Console.ReadKey();
        }
    }
}
